<?php 
class Model_Contact extends Core_Database
{
    /**
     * Them lien he
     * @param $fullname $email $title $content
     * @return bool true: thanh cong false : that bai 
     * */
	public function insertContact($fullname,$email,$title,$content)
	{
		$sql = 'insert into contacts(fullname,email,title,content,date_sent) values (:fullname,:email,:title,:content,NOW())';
    	$sth = $this->_db->prepare($sql);
    	$sth->bindParam(':fullname', $fullname, PDO::PARAM_STR);
    	$sth->bindParam(':email', $email, PDO::PARAM_STR);
    	$sth->bindParam(':title', $title, PDO::PARAM_STR);
    	$sth->bindParam(':content', $content, PDO::PARAM_STR);
    	return $sth->execute();
	}
}
